"""
    Controller for lesson assistant type (of course, it is the dictionary).
"""

from mnemoply import model
from mnemoply.controllers.lookup import LookupController, TableCol, TableLookupDataSource
from mnemoply.controllers.crud import CRUDController

class LessonAssistantTypeController(LookupController, CRUDController):
    model_object = model.LessonAssistantType
    lookup_columns = [
        TableCol(name='name', caption=_('Name'))
        ]

    view_fields = ['name']

    def __init__(self):
        LookupController.__init__(self,
            data_source=TableLookupDataSource('lesson_assistant_type_lookup'),
            columns=self.lookup_columns,
            title=self.model_object.model_title,
        )
        CRUDController.__init__(self, model_object=self.model_object)

exposed = LessonAssistantTypeController()
